import java.util.*;

public class Main {
    public static int gcd(int a, int b) {
        while (b != 0) {
            int temp = b;
            b = a % b;
            a = temp;
        }
        return a;
    }

    public static int lcm(int a, int b) {
        return a / gcd(a, b) * b; // 防止溢出
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int sum = 0;
        int tmp = 2;
        for (int i = 0; i < n; i++) {
            sum += tmp;
            tmp *= 10;
            tmp += 2;
        }
        System.out.println(sum);
    }
}
